Skip to content

cert: profile validate/scaffold and custom profile policy (#13728) - #14498

Open
dezren39 wants to merge 1 commit into
mainfrom
oc-code-08/23594-cert-profile
Open

dezren39 wants to merge 1 commit into
mainfrom
oc-code-08/23594-cert-profile

Conversation

@dezren39

@dezren39 dezren39 commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds the remaining fleet cert profile verb group from spec §6.1 (#13728):

  • profile scaffold --name <name> --out <file> writes a schema-v1 custom leaf profile (refusing to overwrite an existing file).
  • profile validate <file> (or --file) reads, schema-checks and policy-checks a custom profile, with --json output.
  • Custom profile schema fleet-cert-profile/v1 with strict field checking (deny_unknown_fields).
  • Policy checks: supported key/EKU names, at least one key usage, no CA-only key usages (key-cert-sign / crl-sign), no shadowing built-in profile names, default <= max <= 1095 days.
  • leaf issue --profile <path> resolves custom profile files, and signing enforces the profile's max_validity_days after issuer clamping and refuses a key-algorithm override that contradicts a custom profile.
  • doctor and the unknown-verb usage text now report validate/scaffold as built.

Testing

  • cargo test -p fleet-cert — 25 unit + 7 hierarchy + 3 ocsp tests pass.
  • cargo test -p fleet --test cert_profile_cli — 4 CLI tests pass (scaffold→validate round trip, malformed JSON rejected, over-ceiling profile rejected, scaffold won't overwrite).

Closes #13728

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-24T17:13:24Z",
    "session_id": "ses_e5df1941f4effe9vwr6KgwvDU7",
    "lane": null,
    "host": "amd",
    "worktree": "/home/user/.local/share/opencode/worktree/7c7733/oc-code-08-23594-cert-profile",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/user/.local/share/opencode/worktree/7c7733/oc-code-08-23594-cert-profile",
      "repo": "developing-today/code",
      "branch": "oc-code-08/23594-cert-profile",
      "sha": "94ee1c90b608b024bfb983588d0a9dfc4ab6ce1d"
    },
    "auth_subject": "oc-code-03",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Start Proof
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 46 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0d52fe56-3cbf-4525-8c02-12fcfac32d10
Commits

Reviewing files that changed from the base of the PR and between 26dc3f0 and 94ee1c9.

Files selected for processing: 4

  • pkgs/fleet/crates/fleet-cert/src/cli.rs
  • pkgs/fleet/crates/fleet-cert/src/engine.rs
  • pkgs/fleet/crates/fleet-cert/src/profile.rs
  • pkgs/fleet/crates/fleet/tests/cert_profile_cli.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cert: profile validate/scaffold (§6.1 remainder)

1 participant